#pragma once
#include "CCustomHeader.h"
#include <iostream>
#include <vector>
struct MyS {
public:
	MyS() {

	}
	MyS(CString name, int age, int height)
		: name(name)
		, age(age)
		, height(height) {

	}
	CString name;
	int age;
	int height;
};

// CListCtrlEx
#define COLOR_SELECT	RGB(204, 232, 255)
#define COLOR_BORDER	RGB(153, 209, 255)
#define COLOR_NORMAL1	RGB(230, 230, 230)
#define COLOR_NORMAL2	RGB(240, 240, 240)
class CListCtrlEx : public CListCtrl
{
	DECLARE_DYNAMIC(CListCtrlEx)
	std::vector<std::unique_ptr<MyS>> m_dataList;

public:
	CListCtrlEx();
	virtual ~CListCtrlEx();

protected:
	DECLARE_MESSAGE_MAP()
public:
	virtual void DrawItem(LPDRAWITEMSTRUCT lp);
	afx_msg void OnLvnGetdispinfo(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnLvnOdfinditem(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnLvnOdcachehint(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
};


